<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true" 
    Inherits="SharpPieces.DemoApp.LiveGridSkinning" 
    CodeBehind="livegridskinning.aspx.cs" %>

<%@ MasterType VirtualPath="~/Demo.Master" %>

<asp:Content runat="server" ID="head" ContentPlaceHolderID="headPlaceHolder">
    <title>SharpPieces - LiveGrid Skinning - Live Demo</title>
</asp:Content>

<asp:Content ID="descr" runat="server" ContentPlaceHolderID="descriptionPlaceholder">
    <h1>LiveGrid Skinning</h1>
    
    <p>The LiveGrid is 
    skinable through themes; in here we just simmulate this behavior by prefixing the 
    css classes; there are 4 appearances available: Default, WhiteBlue, Black and 
    Light.</p>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="demoPlaceholder" Runat="Server">
    <asp:Label ID="Label1" runat="server" Text="Theme"></asp:Label>
    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
        OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
        <asp:ListItem Text="Default" Value="default" Selected="True"></asp:ListItem>
        <asp:ListItem Text="WhiteBlue" Value="whiteblue"></asp:ListItem>
        <asp:ListItem Text="Black" Value="black"></asp:ListItem>
        <asp:ListItem Text="Light" Value="light"></asp:ListItem>
    </asp:DropDownList>
    <br />
    <br />
    <div id="Div1" runat="server" class="default">
        <piece:LiveGrid ID="LiveGrid1" runat="server" DataProviderPath="ThemesDataProvider.axd" UseCustomStyles="True" 
            AllowResizing="false" IsIndexed="true" FrozenColumnsCount="1" Highlight="CursorRow" VisibleRows="5">
            <Sorting AllowSorting="true" />
            <Columns>
                <piece:LiveGridColumn CssClass="themesColumn_name" HeaderText="Name" AllowSorting="true">
                    <Mapping MappingType="Expression">
                        <ExpressionMapping Expression="{0}" ExpressionFieldNames="Name" SortFieldName="LastName" /> 
                    </Mapping>
                </piece:LiveGridColumn>  
                <piece:LiveGridColumn CssClass="themesColumn_email" HeaderText="Email" AllowSorting="true">
                    <Mapping>
                        <FieldMapping FieldName="EmailAddress" />
                    </Mapping>
                </piece:LiveGridColumn>
                <piece:LiveGridColumn CssClass="themesColumn_phone" HeaderText="Phone" AllowSorting="true">
                    <Mapping>
                        <FieldMapping FieldName="Phone" />
                    </Mapping>
                </piece:LiveGridColumn>                    
            </Columns>
        </piece:LiveGrid>
    </div>
</asp:Content>

